

#ifndef MATRIXBUILDER_H
#define MATRIXBUILDER_H

#include <cmath>

inline Matrix3D rotate_X(Float3D angle_rad)
{
	Matrix3D matrix;
	matrix(0,0) = 1;				matrix(0,1) = 0;				matrix(0,2) = 0;						matrix(0,3) = 0;
	matrix(1,0) = 0;				matrix(1,1) = cos(angle_rad);	matrix(1,2) = sin(angle_rad);			matrix(1,3) = 0;
	matrix(2,0) = 0;				matrix(2,1) = -sin(angle_rad);	matrix(2,2) = cos(angle_rad);			matrix(2,3) = 0;
	matrix(3,0) = 0;				matrix(3,1) = 0;				matrix(3,2) = 0;						matrix(3,3) = 1;
	return matrix;
}
inline Matrix3D rotate_Y(Float3D angle_rad)
{
	Matrix3D matrix;
	matrix(0,0) = cos(angle_rad);			matrix(0,1) = 0; matrix(0,2) = sin(angle_rad);			matrix(0,3) = 0;
	matrix(1,0) = 0;						matrix(1,1) = 1; matrix(1,2) = 0;						matrix(1,3) = 0;
	matrix(2,0) = -sin(angle_rad);			matrix(2,1) = 0; matrix(2,2) = cos(angle_rad);			matrix(2,3) = 0;
	matrix(3,0) = 0;						matrix(3,1) = 0; matrix(3,2) = 0;						matrix(3,3) = 1;
	return matrix;
}
inline Matrix3D rotate_Z(Float3D angle_rad)
{
	Matrix3D matrix;
	matrix(0,0) = cos(angle_rad);			matrix(0,1) = sin(angle_rad);	matrix(0,2) = 0;			matrix(0,3) = 0;
	matrix(1,0) = -sin(angle_rad);			matrix(1,1) = cos(angle_rad);	matrix(1,2) = 0;			matrix(1,3) = 0;
	matrix(2,0) = 0;						matrix(2,1) = 0;				matrix(2,2) = 1;			matrix(2,3) = 0;
	matrix(3,0) = 0;						matrix(3,1) = 0;				matrix(3,2) = 0;			matrix(3,3) = 1;
	return matrix;
}

inline Matrix3D move_XYZ(Float3D x,Float3D y,Float3D z)
{
	Matrix3D matrix;
	matrix(0,0) = 1;				matrix(0,1) = 0;		matrix(0,2) = 0;				matrix(0,3) = x;
	matrix(1,0) = 0;				matrix(1,1) = 1;		matrix(1,2) = 0;				matrix(1,3) = y;
	matrix(2,0) = 0;				matrix(2,1) = 0;		matrix(2,2) = 1;				matrix(2,3) = z;
	matrix(3,0) = 0;				matrix(3,1) = 0;		matrix(3,2) = 0;				matrix(3,3) = 1;
	return matrix;
}
inline Matrix3D stretch_XYZ(Float3D x,Float3D y,Float3D z)
{
	Matrix3D matrix;
	matrix(0,0) = x;				matrix(0,1) = 0; matrix(0,2) = 0;			matrix(0,3) = 0;
	matrix(1,0) = 0;				matrix(1,1) = y; matrix(1,2) = 0;			matrix(1,3) = 0;
	matrix(2,0) = 0;				matrix(2,1) = 0; matrix(2,2) = z;			matrix(2,3) = 0;
	matrix(3,0) = 0;				matrix(3,1) = 0; matrix(3,2) = 0;			matrix(3,3) = 1;
	return matrix;
}










#endif